﻿function convertfarsinumbers() {
    var inputlist = document.getElementsByClassName('farsinumber');
    for (var i = 0; i < inputlist.length; i++) {
        inputlist[i].value = inputlist[i].value.replace(/۱/g, '1');
        inputlist[i].value = inputlist[i].value.replace(/۲/g, '2');
        inputlist[i].value = inputlist[i].value.replace(/۳/g, '3');
        inputlist[i].value = inputlist[i].value.replace(/۴/g, '4');
        inputlist[i].value = inputlist[i].value.replace(/۵/g, '5');
        inputlist[i].value = inputlist[i].value.replace(/۶/g, '6');
        inputlist[i].value = inputlist[i].value.replace(/۷/g, '7');
        inputlist[i].value = inputlist[i].value.replace(/۸/g, '8');
        inputlist[i].value = inputlist[i].value.replace(/۹/g, '9');
        inputlist[i].value = inputlist[i].value.replace(/۰/g, '0');
    }
}